import os
from src.globle import *

def yum_repair():
    os.system("rm -f /var/lib/rpm/__db*")
    os.system("db_verify /var/lib/rpm/Packages")
    os.system("rpm --rebuilddb")

def about_server():
    while True:
        CLEAR_SCREEN['clear']()
        print_head(head=[
            ".................本脚本作用：服务器相关.........................."
        ])
        print_menu_options(menu_options={
            "修复yum makecache报错，如error: rpmdb: xxx failed"
        })
        select_menu(menu_dict={
            '0': return_to_previous_menu,
            '1': yum_repair
        })
